package com.design.simplefactory.c02;

public class UserDAO
{
    public int findPermission(String userName,String userPassword)
    {
    	if(!"123456".equals(userPassword)) {
    		return -1;
    	}
    	if("zhangsan"==userName)
    	{
    		return 2;
    	} else if("lisi".equals(userName)) {
    		return 1;
    	} else if("wangwu".equals(userName)) {
    		return 0;
    	} else {
    		return -1;
    	}
    }
}
